
<template>
  <h2>登录页面</h2>

    <button @click="AddNum">NunBer++:{{ num }}</button>
</template>

<!-- <script>
    export default{
        data(){
             return{
                count:0
             }   
        },
        methods:{
            AddNum(){
                this.count++;
            }
        },
        mounted(){
            console.log("大家好");
        }
    } 
</script>-->

<script setup lang="ts">
import { ref,onMounted } from 'vue';
const num = ref(0);
function AddNum(){
    num.value++;
}
onMounted(()=>{
    console.log("大家好");
})
</script>
   
    
    

